Integrand size = 21, antiderivative size = 49 \[ \int \left (a+b \sec ^2(e+f x)\right ) \tan ^3(e+f x) \, dx=\frac {a \log (\cos (e+f x))}{f}+\frac {(a-b) \sec ^2(e+f x)}{2 f}+\frac {b \sec ^4(e+f x)}{4 f} \]
[Out]
Time = 0.05 (sec) , antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4223, 457, 77} \[ \int \left (a+b \sec ^2(e+f x)\right ) \tan ^3(e+f x) \, dx=\frac {(a-b) \sec ^2(e+f x)}{2 f}+\frac {a \log (\cos (e+f x))}{f}+\frac {b \sec ^4(e+f x)}{4 f} \]
[In]
[Out]
Rule 77
Rule 457
Rule 4223
Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {\left (1-x^2\right ) \left (b+a x^2\right )}{x^5} \, dx,x,\cos (e+f x)\right )}{f} \\ & = -\frac {\text {Subst}\left (\int \frac {(1-x) (b+a x)}{x^3} \, dx,x,\cos ^2(e+f x)\right )}{2 f} \\ & = -\frac {\text {Subst}\left (\int \left (\frac {b}{x^3}+\frac {a-b}{x^2}-\frac {a}{x}\right ) \, dx,x,\cos ^2(e+f x)\right )}{2 f} \\ & = \frac {a \log (\cos (e+f x))}{f}+\frac {(a-b) \sec ^2(e+f x)}{2 f}+\frac {b \sec ^4(e+f x)}{4 f} \\ \end{align*}
Time = 0.08 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.88 \[ \int \left (a+b \sec ^2(e+f x)\right ) \tan ^3(e+f x) \, dx=\frac {b \tan ^4(e+f x)}{4 f}+\frac {a \left (2 \log (\cos (e+f x))+\tan ^2(e+f x)\right )}{2 f} \]
[In]
[Out]
Time = 0.74 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.92
method | result | size |
parts | \(\frac {a \left (\frac {\tan \left (f x +e \right )^{2}}{2}-\frac {\ln \left (1+\tan \left (f x +e \right )^{2}\right )}{2}\right )}{f}+\frac {b \tan \left (f x +e \right )^{4}}{4 f}\) | \(45\) |
derivativedivides | \(\frac {\frac {\sec \left (f x +e \right )^{4} b}{4}+\frac {\sec \left (f x +e \right )^{2} a}{2}-\frac {b \sec \left (f x +e \right )^{2}}{2}-a \ln \left (\sec \left (f x +e \right )\right )}{f}\) | \(49\) |
default | \(\frac {\frac {\sec \left (f x +e \right )^{4} b}{4}+\frac {\sec \left (f x +e \right )^{2} a}{2}-\frac {b \sec \left (f x +e \right )^{2}}{2}-a \ln \left (\sec \left (f x +e \right )\right )}{f}\) | \(49\) |
risch | \(-i a x -\frac {2 i a e}{f}-\frac {2 \left (-a \,{\mathrm e}^{6 i \left (f x +e \right )}+b \,{\mathrm e}^{6 i \left (f x +e \right )}-2 a \,{\mathrm e}^{4 i \left (f x +e \right )}-a \,{\mathrm e}^{2 i \left (f x +e \right )}+b \,{\mathrm e}^{2 i \left (f x +e \right )}\right )}{f \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{4}}+\frac {a \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{f}\) | \(109\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.02 \[ \int \left (a+b \sec ^2(e+f x)\right ) \tan ^3(e+f x) \, dx=\frac {4 \, a \cos \left (f x + e\right )^{4} \log \left (-\cos \left (f x + e\right )\right ) + 2 \, {\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}{4 \, f \cos \left (f x + e\right )^{4}} \]
[In]
[Out]
Time = 0.26 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.63 \[ \int \left (a+b \sec ^2(e+f x)\right ) \tan ^3(e+f x) \, dx=\begin {cases} - \frac {a \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {a \tan ^{2}{\left (e + f x \right )}}{2 f} + \frac {b \tan ^{2}{\left (e + f x \right )} \sec ^{2}{\left (e + f x \right )}}{4 f} - \frac {b \sec ^{2}{\left (e + f x \right )}}{4 f} & \text {for}\: f \neq 0 \\x \left (a + b \sec ^{2}{\left (e \right )}\right ) \tan ^{3}{\left (e \right )} & \text {otherwise} \end {cases} \]
[In]
[Out]
none
Time = 0.19 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.31 \[ \int \left (a+b \sec ^2(e+f x)\right ) \tan ^3(e+f x) \, dx=\frac {2 \, a \log \left (\sin \left (f x + e\right )^{2} - 1\right ) - \frac {2 \, {\left (a - b\right )} \sin \left (f x + e\right )^{2} - 2 \, a + b}{\sin \left (f x + e\right )^{4} - 2 \, \sin \left (f x + e\right )^{2} + 1}}{4 \, f} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 236 vs. \(2 (45) = 90\).
Time = 0.66 (sec) , antiderivative size = 236, normalized size of antiderivative = 4.82 \[ \int \left (a+b \sec ^2(e+f x)\right ) \tan ^3(e+f x) \, dx=-\frac {2 \, a \log \left ({\left | -\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} - \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 2 \right |}\right ) - 2 \, a \log \left ({\left | -\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} - \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} - 2 \right |}\right ) + \frac {3 \, a {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )}^{2} + 20 \, a {\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1}\right )} + 28 \, a - 16 \, b}{{\left (\frac {\cos \left (f x + e\right ) + 1}{\cos \left (f x + e\right ) - 1} + \frac {\cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right ) + 1} + 2\right )}^{2}}}{4 \, f} \]
[In]
[Out]
Time = 19.54 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.94 \[ \int \left (a+b \sec ^2(e+f x)\right ) \tan ^3(e+f x) \, dx=\frac {a\,{\mathrm {tan}\left (e+f\,x\right )}^2}{2\,f}-\frac {a\,\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )}{2\,f}+\frac {b\,{\mathrm {tan}\left (e+f\,x\right )}^4}{4\,f} \]
[In]
[Out]